<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${courses.id}" type="hidden">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">所属机构：</label>
                            <div class="col-sm-8">
                                <input id="orgIdHidden" class="form-control"  type="hidden" th:value="${courses.orgId}" />
                                <select id="orgId" name="orgId" class="form-control">
                                    <option value="">请选择</option>
                                    <option th:each="item : ${orgNews}" th:selected="${courses.orgId eq item.id}"
                                            th:value="${item.id}" th:text="${item.name}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">所属证书：</label>
                            <div class="col-sm-8">
                                <input id="profileIdHidden" class="form-control" type="hidden" th:value="${courses.profileId}" />
                                <select id="profileId" name="profileId" class="form-control">
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">讲师：</label>
                            <div class="col-sm-8">
                                <input id="userIdHidden" class="form-control" type="hidden" th:value="${courses.userId}" />
                                <select id="userId" name="userId" class="form-control">
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">课程名：</label>
                            <div class="col-sm-8">
                                <input id="name" name="name" th:value="${courses.name}" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">缩略图：</label>
                            <div class="col-sm-8">
                                <img id="img" th:src="${courses.thumbnail}" style="width:150px;display:block;">
                                <input type="hidden" id="orgPhoto" name="thumbnail" th:value="${courses.thumbnail}">
                                <button type="button" class="btn btn-success" id="btnUpload" style="margin-top: 10px;">
                                    <i class="fa fa-cloud"></i>上传课程缩略图
                                </button>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">内容描述：</label>
                            <div class="col-sm-8">
                                <textarea id="introduce" style="height: 150px" name="introduce" th:text="${courses.introduce}"
                                          class="form-control" type="text"></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">指导价(元)：</label>
                            <div class="col-sm-8">
                                <input id="guidancePrice" name="guidancePrice" th:value="${courses.guidancePrice}"
                                       class="form-control" type="number">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">优惠价(元)：</label>
                            <div class="col-sm-8">
                                <input id="specialPrice" name="specialPrice" th:value="${courses.specialPrice}"
                                       class="form-control" type="number">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">类型：</label>
                            <div class="col-sm-8">
                                <input id="type1" name="specialPrice" th:value="${courses.type}"
                                       class="form-control" type="hidden">
                                <select id="type" name="type" class="form-control" type="text">
                                    <option value="">请选择</option>
                                    <option value="0">证书课程</option>
                                    <option value="1">师资培训课程</option>
                                    <option value="2">考评员培训课程</option>
                                    <option value="3">高级师资培训课程</option>
                                    <option value="4">高级考评员培训课程</option>
                                </select>
                            </div>
                        </div>
<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-3 control-label">状态（0上架，1下架，9已删除）：</label>-->
<!--                            <div class="col-sm-8">-->
<!--                                <input id="state" name="state" th:value="${courses.state}" class="form-control"-->
<!--                                       type="text">-->
<!--                            </div>-->
<!--                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-3 control-label">课程通过条件<i class="fa fa-question-circle" style="color:#ff8e16 " aria-hidden="true"></i>：</label>
                            <div class="col-sm-8">
                                <select id="adoptFactor" name="adoptFactor" class="form-control">
                                    <option value="">请选择</option>
                                    <option th:each="item : ${adoptFactors}" th:selected="${courses.adoptFactor eq item.value}"
                                            th:value="${item.value}" th:text="${item.value}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="//s.xlongwei.com/res/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/webJs/jzweb/courses/edit.js">
</script>
</body>
</html>
